<?php
/* **************************************************************************
File:					toolbar.estateagent.php
EstateAgent Improved - a Joomla Component
Copyright:			2004 - 2006 by Darko Selesi

Year: 2007
Improved by: Manos Orfanoudakis - "vosk"
Homepage: 		http://www.eaimproved.eu
Version: 			1.3.x                     
License:			GNU/GPL http://www.gnu.org/copyleft/gpl.html
*************************************************************************** */

// ensure this file is being included by a parent file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

require_once( $mainframe->getPath( 'toolbar_html' ) );
//require_once( $mainframe->getPath( 'toolbar_default' ) );

$option = mosGetParam( $_REQUEST, 'option', 'com_estateagent' );
$act = mosGetParam( $_REQUEST, 'act', '' );
$task = mosGetParam( $_REQUEST, 'task', 'null' );

if($act=="manageObj"){
     
     switch($task) {
     	case 'new':
     	case 'edit':
			menuestateagent::EDITOBJ_MENU($task=='edit');
		break;
		case 'publish':
        case 'unpublish':
	    case 'save':
		case 'clone': 
        	break;//No menu... faster code 
   
        #case 'remove':
		#	menuestateagent::EDIT_MENU();
			#break;
		default:
        	menuestateagent::DEFAULTOBJ_MENU();
		break;
     }
}
elseif( $act=="manageCat"){
	 switch($task) {
     	case 'new':
     	case 'edit':
			menuestateagent::EDITCAT_MENU();
		break;
		case 'publish':
        case 'unpublish':
	     case 'save':
        	break;//No menu... faster code 
   
        case 'remove':
			menuestateagent::BACK_MENU();
			break;
		default:
        	menuestateagent::DEFAULTCAT_MENU();
		break;
     }

}
/*
elseif($act=="manageAgts"){
     global $option;

     switch($task) {
     	case 'edit':
			menuestateagent::EDIT_MENU();
		break;
        case 'save':
        	menuestateagent::EDIT_SETTINGS();
		break;
		case 'mail':
			menuestateagent::AGENT_MAIL_MENU();
		break;
		default:
        	menuestateagent::DEFAULT_AGNT_MENU();
		break;
     }
}
*/
elseif($act=="configEA"){
	menuestateagent::EDIT_SETTINGS();
	}

elseif($act=="EAinfo"){
	menuestateagent::BACK_MENU();
    }
?>